<template>
    <div id="map-home">
        <CesiumMap v-if="isMapConfigReady" @on-ready="handleReady"></CesiumMap>
        <Popup
            v-for="(popup, index) in popupList"
            :key="popup.popupId"
            :position="popup.position"
            :show-anchor-line="popup.showAnchorLine"
            @close="handlePopupClose(key)">
            <template #header>
                <div style="width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap">{{ popup.name }}</div>
            </template>
                <Property v-model:layerFeature="popup.data" @on-update="handleUpdate"></Property>
        </Popup>
    </div>
</template>
<script setup>
import CesiumMap from '@/components/Map/CesiumMap.vue';
import Popup from '@/components/Popup/index.vue';

</script>

<style lang="scss" scoped>
.zoom {
  display: flex;
  align-items: center;
  transition: transform 200ms ease;
  &:hover {
    transform: scale(1.5);
  }
}
#map-home {
  position: absolute;
  width: 100vw;
  height: 100vh;
  margin: 0px;
  padding: 0px;
  overflow: hidden;

  .unfold {
    left: calc(3% + 20rem + 20px);
  }
}

// :deep(.el-card__body) {
//   // padding: 5px 5px !important;
//   padding: 5px 5px;
//   // height: 100%;
// }
.property {
  // background-color: red;
  border: 1px solid #efefef;
  border-radius: 5px;
}
.property-item {
  display: flex;
  // justify-content: center;
  line-height: 30px;
  align-items: center;
  width: 100%;
  border: 1px solid #efefef;
  font-size: 12px;
  // border: 1px solid #efefef;
  // background-color: red;

  .label {
    width: 50%;
    border-right: 1px solid rgba($color: #000000, $alpha: 0.1);
    padding: 0 5px;
  }
  .value {
    width: 50%;
    padding: 0 5px;
    cursor: pointer;
  }
}

.label {
  color: rgba(0, 0, 0, 1);
  font-weight: 700;
  font-family: PingFangSC, cursive, sans-serif;
  // font-family: 楷体;
  font-style: normal;
}
.value {
  color: rgba(0, 0, 0, 1);
  font-weight: 550;
  // font-family: 宋体;
  font-family: PingFangSC, cursive, sans-serif;
  font-style: normal;
}

.advisory {
  // width: 40px;
  // display: flex;
  // justify-content: center;
  cursor: pointer;
  border-radius: 5px;
  padding: 3px;
  &:hover {
    background-color: rgba($color: #000000, $alpha: 0.2);
  }
}
.icon-name {
  font-size: 24px;
}

.even {
  // .label {
  //   border-right: 2px solid #fff;
  // }
  background-color: rgba($color: #000000, $alpha: 0.05);
}
:deep(.header-wrapper) {
  // background-color: #409eff;
  // background-color: rgba(0, 153, 255, 0.8);
  border-radius: 5px 5px 0 0;
  background-color: rgba(52, 152, 219, 0.9);
  // border-radius: 5px;
  color: #000000;
  font-weight: 700;
  .close-icon {
    background-color: #d6d6d6;
    border-radius: 50%;
    transform: scale(0.6);
    color: rgba(52, 152, 219, 0.9);
    &:hover {
      transform: scale(0.8);
      background-color: #000000;
      // color: #000000;
    }
  }
}
:deep(.footer-wrapper) {
  background-color: #fff;
  border-radius: 5px;
  color: #000000;
  font-weight: 700;
}

.el-carousel__item h3 {
  color: #475669;
  opacity: 0.75;
  line-height: 200px;
  margin: 0;
  text-align: center;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
:deep(.el-carousel__indicator--horizontal) {
  display: none;
}
:deep(.el-carousel__container) {
  // background-color: #efefef;
  // background-color: rgba($color: #000000, $alpha: 0.2);
}
:deep(.el-carousel__item--card.is-active) {
  width: 200px;
  z-index: initial !important;
}
:deep(.el-carousel__item--card) {
  z-index: initial !important;
}
.el-carousel.carousel:deep(.el-carousel__item--card.is-active.is-in-stage.el-carousel__item--card) {
  transform: translateX(25%) scale(1) !important;
}

.ei-flow-form .el-card__body {
  // 解决大图预览其它地方层级穿透问题
  z-index: initial !important;
}

:deep(.el-card__body) {
  &::-webkit-scrollbar-thumb {
    background-color: transparent;
  }

  &:hover::-webkit-scrollbar-thumb {
    background-color: #c0c0c0;
  }
  &::-webkit-scrollbar-track {
    background-color: transparent;
  }
}
</style>